<template>
    <div>
        <div v-for="app in apps" :key="app" @click="start(app)">{{ app }}</div>
        {{ mainStore.activeAppList }}
    </div>
</template>

<script setup lang="ts">
import { ref } from "vue"
import { useMainStore } from "@/store/mainStore"
import { getAppList } from "@/application/applicationTool"

let mainStore=useMainStore()

function start(app: string) {
    mainStore.startApplication(app)
}

let apps = ref([])

getAppList().then((res: []) => {
    apps.value = res
})
</script>